/*
 *  VertexBuffer.h
 *  RTDemo
 *
 *  Created by steveca  on 10/05/09.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */

#include "VertexFormat.h"

namespace RTRT
{
    class VertexBuffer
        {
        public:
            VertexBuffer()
            : m_length(0),m_buffer(NULL)
            {}
            
            ~VertexBuffer()
            {
                if (m_buffer)
                    destroy();
            }
            
        public:
            Vertex *create(size_t length, const VertexFormat& vf);
            void destroy();
            
        protected:
            size_t m_length;
            Vertex *m_buffer;
            
        };
};

